package com.app.teaware.bean;


import android.text.TextUtils;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.ArrayList;

public class VideoCatalogListData implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    public final static String TYPE_CATALOG = "0", TYPE_VIDEO = "1";


    private String id;
    private String name;
    private String parentId;
    private String type;
    private String online;
    private ArrayList<VideoCatalogListData> children;
    private int totalCount;
    private int onlineCount;


    @JSONField(serialize = false)
    private boolean isExpand = true;
    @JSONField(serialize = false)
    private int level = 0;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public ArrayList<VideoCatalogListData> getChildren() {
        return children;
    }

    public void setChildren(ArrayList<VideoCatalogListData> children) {
        this.children = children;
    }

    public boolean isExpand() {
        return isExpand;
    }

    public void setExpand(boolean expand) {
        isExpand = expand;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    @JSONField(serialize = false)
    public boolean isVideo_BOOLEAN(){
        return  type.equals(TYPE_VIDEO);
    }

    public String getOnline() {
        return online;
    }

    public void setOnline(String online) {
        this.online = online;
    }

    @JSONField(serialize = false)
    public boolean isOnline_BOOLEAN(){
        if(TextUtils.isEmpty(online))return false;
        return  online.equals("1");
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getOnlineCount() {
        return onlineCount;
    }

    public void setOnlineCount(int onlineCount) {
        this.onlineCount = onlineCount;
    }
}
